using System;

namespace AvalonAdmin.BaseViewModel
{
    /// <summary>
    /// 信息事件参数
    /// </summary>
    /// <typeparam name="T">信息类型</typeparam>
    public class InformationEventArgs<T> : EventArgs
    {
        /// <summary>
        /// 信息数据
        /// </summary>
        public T Information { get; }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="information">信息数据</param>
        public InformationEventArgs(T information)
        {
            Information = information;
        }
    }

    /// <summary>
    /// 列表信息事件参数
    /// </summary>
    /// <typeparam name="T">信息类型</typeparam>
    public class ListInformationEventArgs<T> : EventArgs
    {
        /// <summary>
        /// 信息数据列表
        /// </summary>
        public System.Collections.Generic.List<T> Information { get; }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="information">信息数据列表</param>
        public ListInformationEventArgs(System.Collections.Generic.List<T> information)
        {
            Information = information;
        }
    }

    /// <summary>
    /// 信息请求事件处理程序
    /// </summary>
    /// <param name="sender">发送者</param>
    /// <param name="e">事件参数</param>
    public delegate void InformationRequestedHandler(object sender, EventArgs e);

    /// <summary>
    /// 信息请求事件参数
    /// </summary>
    public class InformationRequestedEventArgs : EventArgs
    {
        /// <summary>
        /// 选中的模型
        /// </summary>
        public object? SelectedModel { get; }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="selectedModel">选中的模型</param>
        public InformationRequestedEventArgs(object? selectedModel)
        {
            SelectedModel = selectedModel;
        }
    }
}